Open
Conversation
Author
|
Don't hesitate to criticise my work, it's my first pull request on flutter :) |
QuentinSc
commented
Oct 24, 2019
| this.daysCount = 50000, | ||
| this.onDateChange, | ||
| this.locale = "en_US", | ||
| this.isEdgeFadding = false, |
Author
There was a problem hiding this comment.
New parameter to enable EdgeFadding
Owner
|
Awesome work @QuentinSc, can you try to implement edge fading without using another third-party library? I am a little busy these days so I couldn't review your pull request sooner. |
QuentinSc
commented
Oct 24, 2019
Comment on lines
+59
to
+75
| Padding( | ||
| padding: EdgeInsets.all(50), | ||
| ), | ||
| Text("With edge fadding"), | ||
| Padding( | ||
| padding: EdgeInsets.all(10), | ||
| ), | ||
| DatePickerTimeline( | ||
| _selectedValue, | ||
| isEdgeFadding: true, | ||
| onDateChange: (date) { | ||
| // New date selected | ||
| setState(() { | ||
| _selectedValue = date; | ||
| }); | ||
| }, | ||
| ), |
Author
There was a problem hiding this comment.
2nd example, with EdgeFadding
QuentinSc
commented
Oct 24, 2019
Comment on lines
+46
to
+52
| fading_edge_scrollview: | ||
| dependency: transitive | ||
| description: | ||
| name: fading_edge_scrollview | ||
| url: "https://pub.dartlang.org" | ||
| source: hosted | ||
| version: "1.0.2" |
QuentinSc
commented
Oct 24, 2019
Comment on lines
+72
to
+90
| return DateWidget( | ||
| date: date, | ||
| monthTextStyle: widget.monthTextStyle, | ||
| dateTextStyle: widget.dateTextStyle, | ||
| dayTextStyle: widget.dayTextStyle, | ||
| locale: widget.locale, | ||
| selectionColor: | ||
| isSelected ? widget.selectionColor : Colors.transparent, | ||
| onDateSelected: (selectedDate) { | ||
| // A date is selected | ||
| if (widget.onDateChange != null) { | ||
| widget.onDateChange(selectedDate); | ||
| } | ||
| setState(() { | ||
| widget.currentDate = selectedDate; | ||
| }); | ||
| }, | ||
| ); | ||
| }, |
Author
There was a problem hiding this comment.
Just format code for the DateWidget
QuentinSc
commented
Oct 24, 2019
Comment on lines
+61
to
+70
| Widget buildList(BuildContext context) { | ||
| return ListView.builder( | ||
| itemCount: widget.daysCount, | ||
| scrollDirection: Axis.horizontal, | ||
| controller: new ScrollController(), | ||
| itemBuilder: (context, index) { | ||
| // Return the Date Widget | ||
| DateTime _date = DateTime.now().add(Duration(days: index)); | ||
| DateTime date = new DateTime(_date.year, _date.month, _date.day); | ||
| bool isSelected = compareDate(date, widget.currentDate); |
Author
There was a problem hiding this comment.
Create buildList to avoid code diplucation
Author
|
Thank you. |
208d012 to
955a106
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I just discovered the package https://pub.dev/packages/fading_edge_scrollview and I love it.
I propose an option to use it in your fabulous widget.
I tried to implement it without complexify maintenance.
I added it to example.
Thank you